package day03;

public class HomeWork {
    public static void main(String[] args) {
        /*
        System.out.println(5%2);
        System.out.println(8%2);
        System.out.println(2%8);

        int a=5,b=5;
        a--;
        --b;
        System.out.println(a);
        System.out.println(b);


        int a=5,b=5;
        int c=a++;
        int d=++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);


        int a=5,b=5;
        int c=a--;
        int d=--b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);


        int a=5,b=10,c=5;
        boolean b1 =b>a;
        System.out.println(b1);
        System.out.println(c<b);
        System.out.println(a>=c);
        System.out.println(b<=a);
        System.out.println(b==c);
        System.out.println(a!=c);
        System.out.println(a+c>10);
        System.out.println(b%2==0);
        System.out.println(c++>5);
        System.out.println(c++>5);


        int a=5,b=10,c=5;
        boolean b3 = a>b && c++ >2;
        System.out.println(b3);
        System.out.println(c);\



        int a=5,b=10,c=5;
        boolean b4 = a<b || c++>2;
        System.out.println(b4);
        System.out.println(c);




        int a =5;
        a+=10;
        System.out.println(a);
        a*=2;
        System.out.println(a);
        a/=6;
        System.out.println(a);
        short s=5;
        s+=10;
        System.out.println(s);



        int age =23;
        System.out.println("我今年"+age+"岁了");
        String name ="jones";
        System.out.println("大家好，我叫"+name+"我今年"+age+"岁了");



        int num=5;
        int flag=num>0?1:-1;
        System.out.println(flag);


        int a=8,b=5;
        int max=a>b?a:b;
        System.out.println("max="+max);


        double price = 300.0;
        if (price>=500){
            price*=0.8;

        }
        System.out.println(price);



        int score = 95;
        if(score>=0 && score<=100){
            System.out.println(score+"成绩合法！");
        }


        double price = 300;
        if(price>=500){
            price*=0.8;

        }
        else{
            price*=0.9;

        }
        System.out.println(price);



         */

        double price=6000;
        if(price>=2000){
            price*=0.5;
        }else if(price>=1000){
            price*=0.7;
        }else if(price>=500){
            price*=0.8;
        }else{
            price*=0.9;
        }
        System.out.println("最终消费金额为:"+price);















    }

}
